<%@ include file="/common/taglibs.jsp"%>

<head>
<title><fmt:message key="create.hospital.title" /></title>

<style type="text/css">
checkbox.small {
	display: inline-block;
	width: 75px;
	height: 28px;
	padding: 4px;
	margin-bottom: 9px;
	font-size: 13px;
	line-height: 18px;
	color: #555555;
	border: 1px solid #ccc;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
}

div.two_col_left_box {
	float: left;
	padding: 0px;
	width: 380px;
	border: 0px solid gray;
}

div.two_col_right_box {
	float: right;
	padding: 0px;
	width: 380px;
	border: 0px solid gray;
}

div.three_col_left_box {
	float: left;
	padding: 0px;
	width: 270px;
	border: 0px solid gray;
}

div.three_col_mid_box {
	float: left;
	padding: 0px;
	width: 270px;
	border: 0px solid gray;
}

div.three_col_mid_box_half {
	float: left;
	padding: 0px;
	margin-left: 10px;
	width: 80px;
	border: 0px solid gray;
}

div.three_col_right_box {
	float: left;
	padding: 0px;
	width: 220px;
	border: 0px solid gray;
}

div.form_row {
	width: 860px;
	padding: 1px;
	overflow: hidden;
	border: 0px solid gray;
	margin-top: 5px;
}

div.section_header {
	width: 840px;
	height: 26px;
	color: #FFFAFA;
	display: table-cell;
	vertical-align: middle;
	background-color: #545454;
	padding: 0 5px 2px;
	font-family: serif;
	font-size: 14px;
}
</style>
</head>

<body class="createHospital" />

<div class="span12">
	<s:form name="createHospitalForm" action="saveHospital.action"
		enctype="multipart/form-data" method="post" validate="true"
		cssClass="well form-vertical">

		<s:hidden key="id" />
		<input type="hidden" name="from" value="${param.from}" />
		
		<div class="section_header">
			<b>HOSPITAL INFORMATION</b>
		</div>

		<div class="form_row">
			<div class="three_col_left_box">
				<s:textfield key="hospital.name" required="true" />
			</div>

			<div class="three_col_mid_box">
				<s:textfield key="hospital.registrationNumber" required="true" />
			</div>

			<div class="three_col_right_box">
				<fieldset class="control-group">
					<label for="zones" class="control-label"><fmt:message
							key="hospital.zone" /></label>
					<div class="controls">
						<select id="zone" name="hospital.zones.id">
							<s:iterator value="zones">
								<option value="<s:property value="id"/>">
									<s:property value="name" />
								</option>
							</s:iterator>
						</select>
					</div>
				</fieldset>
			</div>
		</div>

		<div class="form_row">
			<div class="three_col_left_box">
				<s:textfield key="hospital.phoneNumber" />

			</div>

			<div class="three_col_mid_box">
				<s:textfield key="hospital.mobileNumber" required="true" />
			</div>

			<div class="three_col_right_box">
				<s:textfield key="hospital.fax" />
			</div>
		</div>

		<div class="form_row">
			<div class="three_col_left_box">
				<s:textfield key="hospital.beds" />
			</div>

			<div class="three_col_mid_box">
				<s:select name="hospital.hospitalType" key="hospital.hospitalType"
					list="#{'Private':'Private','Government':'Government','Semi Government':'Semi Government','Corporate':'Corporate','Charity':'Charity'}"
					headerKey="-1" headerValue="--- Select ---" required="true"></s:select>
			</div>

			<div class="three_col_right_box">
				<fieldset class="control-group">
					<label for="status" class="control-label"><fmt:message
							key="hospital.status" /></label>
					<div class="controls">
						<select id="status" name="hospital.status">
							<s:iterator value="statusList" var="varStatus">
								<option value="<s:property value="label"/>"
									${fn:contains(varStatus.label, hospital.status) ? 'selected' : ''}>
									<s:property value="value" />
								</option>
							</s:iterator>
						</select>
					</div>
				</fieldset>
			</div>
		</div>

		<div class="form_row">
			<div class="three_col_left_box">
				<s:textfield key="hospital.email" required="true" />

			</div>

			<div class="three_col_mid_box">
				<s:textfield key="hospital.website" />
			</div>

			<div class="three_col_right_box">
				<s:textarea key="hospital.address" required="true" />
			</div>

		</div>

		<div class="section_header">
			<b>PRIMARY CONTACT PERSON INFORMATION</b>
		</div>

		<div class="form_row">
			<div class="three_col_left_box">
				<s:textfield key="hospital.contactPersonName" required="true" />
			</div>

			<div class="three_col_mid_box">
				<s:textfield key="hospital.contactPersonMobile" required="true" />
			</div>

			<div class="three_col_right_box"></div>
		</div>

		<fieldset class="form-actions">
			<s:submit key="button.save" cssClass="btn btn-primary" theme="simple" />
			<s:submit key="button.cancel" method="cancel" cssClass="btn"
				theme="simple" />
		</fieldset>
	</s:form>

</div>

